<template>
  <div>
    <ul>
      <li>
        <input type="checkbox" :checked="item.flag" @change="chooseOne(index)" />
      </li>
      <li>{{ item.id }}</li>
      <li>{{ item.productName }}</li>   
      <li><img :src="'img/' + item.productImage"  /></li>
      <li>商品数量</li>
      <li><button>删除</button><button>详情</button></li>
    </ul>
  </div>
</template>


<script>
// import Bus from '../Bus'
export default {
  props: ["item", "index"],
  data() {
    return {};
  },
  methods: {
    chooseOne(index) {
      this.$emit('chooseOne',index)
    },
  },
  mounted() {
    
  },
};
</script>

<style>
ul {
  width: 100%;
  height: 100px;
  display: flex;
}
li {
  flex: 1;
  border: 1px solid;
}
img {
  width: 100px;
}
</style>